import Layout from '@/layout/index.vue'
import component from 'element-plus/es/components/tree-select/src/tree-select-option.mjs'

// 常量路由
export const constantRoutes = [
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'Login', // 命名路由，要注意下大小写，到权限管理时候再回顾下
    meta: { title: '登录', hidden: true },
  },
  {
    path: '/',
    component: Layout,
    name: 'layout',
    redirect: '/home',
    meta: { title: '首页', hidden: false, icon: 'HomeFilled' },
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: { title: '首页', hidden: false, icon: '' }, //没有icon在面包屑中就不会显示
      },
    ],
  },
  {
    path: '/user',
    component: Layout,
    name: 'UserCenter',
    redirect: '/user/center',
    meta: { title: '个人中心', hidden: true, icon: 'User' },
    children: [
      {
        path: '/user/center',
        component: () => import('@/views/userCenter/index.vue'),
        meta: { title: '个人中心', hidden: false, icon: '' },
        children: [
          {
            path: '/user/center/qyyjt',
            name: 'qyyjt',
            component: () => import('@/views/userCenter/qyyjt.vue'),
            meta: { title: '企业预警通', hidden: false },
          },
        ],
      },
    ],
  },
  {
    path: '/acl',
    component: Layout,
    name: 'Acl',
    meta: { title: '权限管理', hidden: false, icon: 'Lock' },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        component: () => import('@/views/acl/user/index.vue'),
        name: 'User',
        meta: { title: '用户管理', hidden: false, icon: 'User' },
      },
      {
        path: '/acl/role',
        component: () => import('@/views/acl/role/index.vue'),
        name: 'Role',
        meta: { title: '角色管理', hidden: false, icon: 'UserFilled' },
      },
      {
        path: '/acl/permission',
        component: () => import('@/views/acl/permission/index.vue'),
        name: 'Permission',
        meta: { title: '菜单管理', hidden: false, icon: 'Histogram' },
      },
    ],
  },
  {
    path: '/ibd',
    component: Layout,
    name: 'Ibd',
    meta: { title: '投行业务', hidden: false, icon: 'DataAnalysis' },
    redirect: '/ibd/organization',
    children: [
      {
        path: '/ibd/organization',
        component: () => import('@/views/ibd/organization/index.vue'),
        name: 'Organization',
        meta: { title: '组织机构', hidden: false, icon: 'OfficeBuilding' },
      },
      {
        path: '/ibd/organization/detail/:id',
        component: () => import('@/views/ibd/organization/detail.vue'),
        name: 'OrganizationDetail',
        meta: { title: '组织详情', hidden: true, icon: 'Compass' },
      },
      {
        path: '/ibd/project',
        component: () => import('@/views/ibd/project.vue'),
        name: 'Project',
        meta: { title: '项目情况', hidden: false, icon: 'CollectionTag' },
      },
      {
        path: '/ibd/comment',
        component: () => import('@/views/ibd/comment.vue'),
        name: 'Comment',
        meta: { title: '沟通记录', hidden: false, icon: 'ChatDotSquare' },
      },
      {
        path: '/ibd/contact',
        component: () => import('@/views/ibd/contact.vue'),
        name: 'Contact',
        meta: { title: '联系人', hidden: false, icon: 'Iphone' },
      },
    ],
  },
  // {
  //   path: '/qyyjt',
  //   name: 'Qyyjt',
  //   component: Layout,
  //   meta: { title: '企业预警通', hidden: false, icon: 'Search' },
  //   redirect: '/qyyjt/user',
  //   children: [
  //     {
  //       path: '/qyyjt/user',
  //       name: 'UU',
  //       component: () => import('@/views/qyyjt/qyyjt.vue'),
  //       meta: { title: '企业预警通', hidden: false },
  //     },
  //   ],
  // },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: { title: '404', hidden: true },
  },
  {
    path: '/:pathMach(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: { title: '任意', hidden: true },
  },
]
